f <- function() { 

a <- c(1:5)
a[c(1, 10, 10)] <- c(42, 43, 12)
a

}

f()
